{extend name="template/base_default"}
{block name="header"}
<link rel="stylesheet" href="__CDN__/weui/weui.min.css">
<link rel="stylesheet" href="__CDN__/weui/jquery-weui.min.css">
<link rel="stylesheet" href="__CSS__/demos.css">
{/block}
{block name="body"}
<header class='demos-header'>
    <h1 class="demos-title">幼柔产品中奖防伪查询</h1>
</header>
<div class="form">
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">序列号</label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" id="code" name="code" >
            </div>
        </div>

    </div>
    <div class="button_sp_area">
        <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_primary" style="float: left;margin: 15px " id="submit">查询</a>
        <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_default" style="float: right;margin: 15px" id="clear">重置</a>
    </div>
    <div  style="display: inline-block;width: 80%;margin-left:10%;border: 1px solid deepskyblue; text-align: center" id="content" >
        <h4 style="text-align: center">输入序列号查询是否中奖</h4>
        <p style="text-align: center">刮刮奖截止兑换日期2016-7-1</p>
    </div>
</div>

{/block}
{block name="footer"}
<script type="text/javascript" src="__JS__/public.js"></script>
<script type="text/javascript">

    $('#clear').click(function () {
        $('#code').val('');
    });
    $('#submit').click(function () {

            var body  ={
                code:$('#code').val()
        };
            var $this = $(this);
            ajax_post(getBaseUrl()+'/index/findcode',jQuery.param(body),{
                success:function(data){
                    $.toast(data.data);
                    $this.removeClass('weui-btn_disabled').removeAttr("disabled");

                },
                error:function(data){
                    $.toptip(data.msg, 'error');
                    $this.removeClass('weui-btn_disabled').removeAttr("disabled");
                }
            })


    });





</script>
{/block}